<h1>Mostrar Distrito <%= @shared_district.name %></h1>
<% if flash[:notice] %>
    <div id="notice"><%= flash[:notice] %></div>
<% end %>
<div class="shadow">
<fieldset id="agrupacion" >
<legend>Datos Básicos </legend>
<p>
  <b>Nombre:</b>
  <%= @shared_district.name %>
</p>
<% if ! @shared_district.province.blank? %>
<p>
  <b>Provincia:</b>
  <%= link_to @shared_district.obj_province.name,{:controller=>"/shared/provinces",:action => 'show',:id => @shared_district.province},:title => @shared_district.obj_province.name %>
  <%#= @shared_district.obj_province.name %>
</p>
<p>
  <b>Departamento:</b>
  <%= link_to @shared_district.obj_province.obj_department.name,{:controller=>"/shared/departments",:action => 'show',:id => @shared_district.obj_province.obj_department.id},:title => @shared_district.obj_province.obj_department.name %>
  <%#= @shared_district.obj_province.name %>
</p>
<%end%>
</fieldset>
<fieldset id="agrupacion" >
  <legend>Instituciones Culturales por Distrito</legend>
  <% if !(@shared_district.cultural_institutions.blank?)  %>
  <table class="paginated_table sorted_table" >
    <thead>
    <tr>
      <th>Nombre</th>
      <th>E-Mail</th>
      <th>Web</th>
    </tr>
  </thead>
  <tbody>
  <% @shared_district.cultural_institutions.each do |cultural_institution| %>
    <tr>
      <td>
        <%= link_to cultural_institution.name,{:controller=>"/cultural_heritage/cultural_institutions",:action => 'show',:id => cultural_institution.id},:title => cultural_institution.description %>
      </td>
      <td>
        <A HREF="mailto:<%= cultural_institution.email %>"><%= cultural_institution.email %></A>
      </td>
      <td>
        <a href="<%=  cultural_institution.web%>" target="_blank"><%=  cultural_institution.web%></a>
      </td>
    </tr>
  <% end %>
  </tbody>
  </table>
  <% else %>
      <p> Ningún registro encontrado</p>
  <% end %>
</fieldset>
</div>
<br/>
<% if (user_signed_in? && ([2].include?(current_user.role))) %>
<%= link_to 'Editar', edit_shared_district_path(@shared_district) %> |
<%end%>
<%= link_to 'Regresar', shared_districts_path %>
